<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
	request.setAttribute("path", request.getContextPath());
%>
<script type="text/javascript">
$(function(){
	common.ajaxQuery("${root}/app/position/list");
});
function deleteById(id){
	if(confirm("确定删除!")){
		var url = "${root}/app/position/delete/"+id
		common.ajaxSubmitWithData(url,"","删除失败","",'common.ajaxQuery("${root}/app/position/list")');
	}
}
function addNew(){
	var name = $("#name").val();
	var type = $("#type").val();
	if(common.isEmpty(name)){
		common.modalGlobalMessage("请设置职位名称!");
	}else{
		var url = "${root}/app/position/update"
		common.ajaxSubmitWithData(url,{name:name,type:type},"保存失败","",'common.ajaxQuery("${root}/app/position/list")');
	}
	
}
</script>
<form id="queryForm">
<input name="orderName" value="id" type="hidden">
</form>
<div class="table-responsive">
<table class="table table-striped table-bordered">
	<thead>
		<tr >
			<th class="col-sm-2 text-center">序号</th>
			<th class="col-sm-2 text-center">类型</th>
			<th class="col-sm-3 text-center">编码</th>
			<th class="col-sm-3 text-center">名称</th>
			<th class="col-sm-2 text-center">操作</th>
		</tr>
	</thead>
	<tbody id="dataList">
	</tbody>
</table>
</div>

